<template>

      <div>
          <h1 id="title" class="myText">登录页面</h1>
          <span>用户名:</span>
          <input type="text" v-model="userInfo.userName">
          <span>密码:</span>
          <input type="password" v-model="userInfo.userPwd">

          <button type="button" @click="login">登录</button>
      </div>

</template>

<script>
  /* 导入自定义的函数和变量*/
  import  {add,hello} from '../../assets/js/test.js'

  /* 导入自定义的对象*/
  import count from '@/assets/js/test01.js'

  export default {
         name:"hello01",//描述组件名称
         data(){ //数据绑定，对应的是data:
           return{
               userInfo:{//绑定用户对象
                    userName:"",
                    userPwd:""
               }
           }
         },
         methods:{ //定义函数
             login(){//登录
               //var title = $("#title").text();
               //alert(title);
               count.add();
               alert(count.hello);

             }
         }
  }

</script>

<style>

</style>
